<?php

function search_game($search_field,$keyword,$rows)
 {
	switch($search_field)
	 {
		case 1:
				if(check_game_exist($keyword)==true)
				 {
					$result=search_game_title($keyword,$rows);
					return $result;
				 }
				break;
		case 2:
				$result=search_release_date($keyword,$rows);
				return $result;
				break;
		case 3:
				if(check_category_exist($keyword)==true)
				 {
					$category_id=get_game_category_id($keyword);
					$result=search_game_category($category_id,$rows);
					return $result;
				 }
				break;
	 }
 }
?>